import { AdvController } from './lunbo.controller';
import { Module } from '@nestjs/common';
import { MulterModule } from '@nestjs/platform-express';
import { resolve } from 'path';
import { diskStorage } from 'multer';

@Module({
    imports: [MulterModule.register({
        storage: diskStorage({
            destination: function (req, file, cb) {
                cb(null, resolve() + '/public/advimg');
            },
        }),
        limits: {
            files: 5,
            fileSize: 20 * 1024 * 1024,
            fieldSize: 20 * 1024 * 1024
        }

    }),],
    controllers: [
        AdvController,],
    providers: [],
})
export class AdvModule { }
